package leetcode;

/**
 * @program: datastructureandalogorithm
 * @description:
 * @author: hmx
 * @create: 2021-12-26 10:36
 **/
public class LeetCode5963 {

    public boolean isSameAfterReversals(int num) {
        String str = String.valueOf(num);
        int n = str.length();
        if (n == 1) {
            return true;
        }

        int i = n - 1;
        while (i >= 1) {
            if (str.charAt(i) == '0') {
                return false;
            } else {
                break;
            }
        }

        return true;
    }

    public static void main(String[] args) {
        LeetCode5963 code = new LeetCode5963();
        System.out.println(code.isSameAfterReversals(0));
    }

}
